from sqlalchemy import Table, MetaData, Column, Integer, String, ForeignKey
from sqlalchemy.orm import registry
mapper_registry = registry()
Base = mapper_registry.generate_base()
# metadata = Base.metadata
# metadata.bind = engine

class RecommendList(Base):
    __tablename__ = "recommendList"
    #__table__ = Table('recommend', metadata, autoload_with=engine)
    rem_key = Column(Integer, primary_key=True)
    rem_value = Column(String(500))
    rem_count = Column(Integer)
    rem_type = Column(String(20))
    def __init__(self,rem_key=None,rem_value=None,rem_count=None,rem_type=None):
        self.rem_key = rem_key
        self.rem_value = rem_value
        self.rem_count = rem_count
        self.rem_type = rem_type

    def format_str(self):
        return self.rem_key+","+self.rem_value+","+str(self.rem_count)+","+str(self.rem_type)











